package com.adee.gulimall.member;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;

/*
* 使用openfeign远程调用其他服务：
* 1. @EnableFeignClients开启远程服务调用功能
* 2. 编写一个接口，加上@FeignClient("gulimall-coupon")，表示要调用哪个服务
* 3. 将源服务中被调用的api方法签名复制粘贴到该接口中，如CouponFeignService类
* */
@EnableFeignClients(basePackages = "com.adee.gulimall.member.feign")
// 开启服务注册发现功能
@EnableDiscoveryClient
@MapperScan("com.adee.gulimall.member.dao")
@SpringBootApplication
public class GulimallMemberApplication {
    public static void main(String[] args) {
        SpringApplication.run(GulimallMemberApplication.class, args);
    }
}
